﻿using Coolzon.UI.Core.Parts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace Coolzon.UI.Core.Runtime.Script
{
    public class AreaScriptObject
    {
        private WeakReference _area;
        public AreaScriptObject(Area area)
        {
            _area = new WeakReference(area);
        }

        //public object getObject(string name)
        //{
        //    Area area = _area.Target as Area;
        //    if (area == null)
        //    {
        //        return null;
        //    }
            
        //    Part part = area.GetChildPart(name, true);
        //    if (part != null)
        //    {
        //        return part.GetScriptObj();
        //    }
        //    return null;
        //}
    }
}